> TODO
	转换流程设计文档
	Watch() Register() 
	
	
> gloo GW(VS) -> PROXY 具体转换流程
	>> 将同一proxyName的GW组成一个proxy:GWList a的map
	>> 遍历 map，拿到同一个ProxyName下的GWList 
	>> 根据namespace过滤 GWList
	>> ** 验证 gateway 中 http 类型 gateway 中的 VS 是否存在，验证是否有重复地址的 gateway，异常则丢弃
	>> ** 遍历GWList，获取GW，然后遍历 snap 里的 VSList，如果GW 里存在就添加到 VSForGWList
	>> 加上全局配置的 oneWayTls，如果 VS 的 oneWayTls没配
	>> ** 验证 VS domain ，如果重复，则去除 domain 和 VS
	>> ** 通过VS组装 VH 对象，把 VHList 和 sslConfig 组装到 listener 中
	>> ListenerList 组装成 Proxy

> gloo translatorSyncer Sync(ctx context.Context, snap *v1.ApiSnapshot) error
	>> 概述
		将监听的资源生成xDS对象
	>> 结构
		>>> syncEnvoy(ctx context.Context, snap *v1.ApiSnapshot, allReports reporter.ResourceReports) error  proxy生成 xDSSnapshot
			>>>> translatorFactory Translate(params Params, proxy Proxy) (Snapshot, ResouceReports, ProxyReport, error) 生成一个 translatorInstance 来获取 proxy -> xDSSnapshot
				>>>>> translatorInstance Translate(params Params, proxy Proxy) (envoycache.Snapshot, reporter.ResourceReports, ProxyReport, error) 根据 proxy 生成 xDSSnapshot
					>>>>>> createUpstreamToEndpointsMap(upstreams []Upstream, endpoints []Endpoint) map[string][]Endpoint  通过遍历upstream endpoint ，同一upstream 下的 eDS作为eDSList作为值保存，map upstreamName: eDSList
					>>>>>> computeClusters(params Params, report ResourceReports, upstreamRefKeyToEndpoints map[string][]Endpoint, proxy Proxy) []*Cluster 遍历ClusterList，cluster->envoyCluster
						>>>>>>> validateUpstreamLambdaFunctions(proxy Proxy, upstreams UpstreamList, upstreamGroups UpstreamGroupList, reports ResourceReports)
							>>>>>>>> validateRouteDestinationForValidLambdas(proxy Proxy, route Route, upstreamGroup UpstreamGroupList, reports ResourceReports, upstreamLambdas map[string]map[string]bool)  
								RouteAction_Single Destination 添加到 DestList
								RouteAction_Multi DestinationList 遍历后 添加到 DestList
								RouteAction_UpstreamGroup 校验 Route 的 UpstreamGroupRef是否真实存在，再将 upstreamGroup 遍历后 添加到 DestList
								UpstreamToClusterName(upstream *core.ResourceRef) string  拼接upstream Name和 Namespace
						>>>>>>> computeCluster(params Params, upstream Upstream, upstreamRefKeyToEndpoints Endpoint, reports ResourceReports) Cluster  组装 HC OD 熔断 LB ConnectTimeout Http2Opt SslConfig TransportSocket EDS 为 Cluster；并进行Cluster 的校验
							>>>>>>>> initializeCluster(upstream Upstream, upstreamRefkeytoendpoints Endpoint, report ResourceReports, secrets SecretList) Cluster 组装 HC OD 熔断 LB ConnectTimeout Http2Opt SslConfig TransportSocket EDS 为 Cluster
								>>>>>>>>> createHealthCheckConfig(upstream Upstream, secrets SecretList) (HealthCheck, error)  校验 hc HealthyThreshold UnhealthyThreshold HealthChecker 没有则报错；HC->envoyHC 转换
									>>>>>>>>>> ToEnvoyHealthCheck(check HealthCheck, secrets SecretList) (HealthCheck, error) HealthCheck 转换为 envoyHC
								>>>>>>>>> createOutlierDetectionConfig(upstream Upstream) (OutlierDetection, error)  校验OutlierDetection.HealthChecker.Interval 参数；OD->envoyOD转换
								>>>>>>>>> applyDefaultsToUpstreamSslConfig(sslConfig *v1.UpstreamSslConfig, options *v1.UpstreamOptions)  设置默认的UpstreamSslConfig
								>>>>>>>>> ResolveUpstreamSslConfig(secrets SecretList, uc UpstreamSslConfig) (UpstreamTlsContext, error)  组装commonTlsContext和sni为 upstreamTlsContext
									>>>>>>>>>> ResolveCommonSslConfig(cs CertSource, secrets v1.SecretList, mustHaveCert bool) (*envoyauth.CommonTlsContext, error) 组装 commonTlsContext
								>>>>>>>>> SetEdsOnCluster(out Cluster, settings Settings) 将 EDS 的配置组装到 Cluster
							>>>>>>>> validateCluster(c Cluster) error  校验 Cluster 的类型是否为 STATIC STRICT_DNS LOGICAL_DNS，校验 Cluster 是否包含 Endpoint
					>>>>>> computeClusterEndpoints(params Params, upstreamRefKeyToEndpoints map[string][]*Endpoint, reports ResourceReports) ClusterLoadAssignment 将endpoint组装cDS 的 LoadAssignments
						>>>>>>> loadAssignmentForUpstream(upstream Upstream, clusterEndpoints Endpoint) ClusterLoadAssignment  一个upstream下的endpointList进行遍历 组装Endpoint 的HC LB Hostname， 组装LocalityLbEndpoints 作为cDS的配置
					>>>>>> computeListenerResources(params Params, proxy Proxy, listener Listener, listenerReport ListenerReport) listenerResouces  通过 listener 和 routeConfig 组装 listenerResources
						>>>>>>> computeRouteConfig(params Params, proxy Proxy, listener Listener, routeCfgName string, listenerReport ListenerReport) RouteConfiguration 校验listener中的ssl，通过VHList 组装为 RouteConfig
							>>>>>>>> computeVirtualHosts(params Params, proxy Proxy, listener Listener, httpListenerReport HttpListenerReport) VirtualHost 检验 VH；组装 VH 为 VHList
								>>>>>>>>>> ValidateVirtualHostDomains(virtualHosts []VirtualHost, httpListenerReport HttpListenerReport) 检验VH的domain 重复则异常
								>>>>>>>>>> computeVirtualHost(params VirtualHostParams, virtualHost VirtualHost, requireTls bool, bhostReport VirtualHostReport) VirtualHost 组装 VH 的 name domains routes requireTls
							>>>>>>>> validateListenerSslConfig(params Params, listener Listener) error 检验是否能正常组装为downstreamTlsContext ，遍历 listener 组装 commonTlsContext sni 为 downstreamTlsConstext，如果都能顺利组装则不报错
								>>>>>>>>> ResolveDownstreamSslConfig(secrets v1.SecretList, dc *v1.SslConfig) (*envoyauth.DownstreamTlsContext, error) 组装 commonTlsContext sni 为 downstreamTlsConstext
									>>>>>>>>>> ResolveCommonSslConfig(cs CertSource, secrets v1.SecretList, mustHaveCert bool) (*envoyauth.CommonTlsContext, error) 组装 commonTlsContext
						>>>>>>>> computeListener(params Params, proxy Proxy, listener Listener, listenerReport ListenerReport) Listener 通过 address 组装 envoylistener
							>>>>>>>>> validateListenerPorts(proxy Proxy, listenerReport ListenerReport) 校验 proxy 的listener 端口，不可以重复
							>>>>>>>>> computeListenerFilters ???运行HTTP过滤器链插件和侦听器插件
							>>>>>>>>> computeFilterChainsFromSslConfig() 为我们想要服务的每个ssl证书创建一个listenerFC的副本。如果侦听器上没有ssl配置，envoylistener将有一个不安全的FC
							>>>>>>>>> CheckForDuplicateFilterChainMatches
				>>>>>> GeneratedResources(params Params, inClusters Cluster, inEndpoint ClusterLoadAssignment, inRouteConfigurations RouteConfiguration, inListeners Listener) ([]Cluster, []ClusterLoadAssignment, []RouteConfiguration, Listener, error)  使用插件再次对四种资源进行添加
				>>>>>> generateXDSSnapshot(cluster []Cluster, endpoints []ClusterLoadAssignment, routeConfigs []RouteConfiguration, listeners []Listener) Snapshot 将四种资源的版本（通过hash的值）和 资源组装为 envoySnapshot
					>>>>>>> NewSnapshotFromResources(endpoints Resources, clusters Resources, routes Resource, listeners Resources) Snapshot 根据四种资源组装 envoySnapshot
						downgradeCacheResources(resources Resources) Resources 兼容 envoy v2资源
		>>> SnapshotKey
		>>> SanitizeSnapshot
		>>> updateEndpointsOnly
		>>> SetSnapshot

> dam 对象->xDS 对象 与之前相比，会不会影响到转换过程，envoy对象的字段，会经过哪些转换，在对象发生了改变后会产生哪些影响

Route TypedPerFilterConfig -> VS TypedPerFilterConfig
可以用来为过滤器提供特定于路由的配置。这个键应该匹配过滤器名称，例如HTTP缓冲过滤器的envoy.filters.http.buffer。该字段的使用是特定于过滤器的;查看“HTTP过滤器文档(config_http_filters)”了解它是否被使用以及如何被使用
